<template>
  <div>
    <div class="mengceng"
         v-if="isShow"
         @click="guanbi"></div>
    <div class="liebiao"
         @click="zhankai"
         ref="liebiao">
      <i class="el-icon-s-operation"></i>
    </div>
    <div class="yuan"
         ref="yuan">
      <div class="shenqing">
        <i class="el-icon-s-promotion
 tubiao"></i>
        <p class="ziti"
           @click="shenqing">我的申请</p>
      </div>
      <div class="tuijian"
           @click="recommend ">
        <i class="el-icon-s-custom tubiao"></i>
        <p class="ziti">我的推荐</p>
      </div>
      <div class="jianli"> <i class="el-icon-s-operation tubiao"></i>
        <p class="ziti"
           @click="put">我的简历</p>
      </div>
      <div class="zixun"
           @click="seek"> <i class=" el-icon-s-comment tubiao"></i>
        <p class="ziti">我的咨询</p>
      </div>
      <div class="xyuan"
           @click="joblist">
        <div class="xin">职位列表</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      isShow: false,
      path: ''
    }
  },
  methods: {
    put () {
      if ("/application" != this.path) {
        this.$router.push('/application')
      } else if ("/application" == this.path) {
        this.isShow = false
        this.$refs.yuan.style.right = "-150px"
        this.$refs.yuan.style.bottom = "-150px"
        this.$refs.yuan.style.display = "0"
        this.$refs.liebiao.style.zIndex = "50"
      }
    },
    joblist () {
      if ("/phoneIndex" != this.path) {
        this.$router.push('/phoneIndex')
      } else if ("/phoneIndex" == this.path) {
        this.isShow = false
        this.$refs.yuan.style.right = "-150px"
        this.$refs.yuan.style.bottom = "-150px"
        this.$refs.yuan.style.opacity = "0"
        this.$refs.liebiao.style.zIndex = "50"
      }
    },
    recommend () {
      if ("/lication" != this.path) {
        this.$router.push('/lication')
      } else if ("/lication" == this.path) {
        this.isShow = false
        this.$refs.yuan.style.right = "-150px"
        this.$refs.yuan.style.bottom = "-150px"
        this.$refs.yuan.style.opacity = "0"
        this.$refs.liebiao.style.zIndex = "50"
      }
    },
    shenqing () {
      if ("/shenqing" != this.path) {
        this.$router.push('/shenqing')
      } else if ("/shenqing" == this.path) {
        this.isShow = false
        this.$refs.yuan.style.right = "-150px"
        this.$refs.yuan.style.bottom = "-150px"
        this.$refs.yuan.style.opacity = "0"
        this.$refs.liebiao.style.zIndex = "50"
      }
    },
    seek () {
      if ("/seek" != this.path) {
        this.$router.push('/seek')
      } else if ("/seek" == this.path) {
        this.isShow = false
        this.$refs.yuan.style.right = "-150px"
        this.$refs.yuan.style.bottom = "-150px"
        this.$refs.yuan.style.opacity = "0"
        this.$refs.liebiao.style.zIndex = "50"
      }
    },
    zhankai () {
      this.isShow = true
      this.$refs.yuan.style.right = "50%"
      this.$refs.yuan.style.bottom = "220px"
      this.$refs.yuan.style.opacity = "1"
      this.$refs.liebiao.style.zIndex = "9"
    },
    guanbi () {
      this.isShow = false
      this.$refs.yuan.style.right = "-150px"
      this.$refs.yuan.style.bottom = "-150px"
      this.$refs.yuan.style.opacity = "0"
      this.$refs.liebiao.style.zIndex = "50"
    },
  },
  created () {
    this.path = this.$route.path
  }
}
</script>

<style scoped>
.liebiao {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  text-align: center;
  line-height: 30px;
  position: fixed;
  right: 20px;
  bottom: 65px;
  z-index: 50;
}
.mengceng {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  overflow: auto;
  background: rgba(0, 0, 0, 0.3);
}
/* .xy {
  height: 0px;
  width: 0px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  border: 5px solid #bfbfbf;
  position: fixed;
  right: 300px;
  bottom: 70px;
  margin-left: -150px;
  z-index: 999;
} */
.yuan {
  height: 290px;
  width: 290px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  border: 5px solid #bfbfbf;
  position: fixed;
  bottom: 0px;
  right: -150px;
  margin-right: -150px;
  z-index: 20;
  transition: all 0.5s ease-out;
}
.xyuan {
  height: 100px;
  width: 100px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.9);
  text-align: center;
  border: 5px solid #5a5a5a;
  margin: 0 auto;
  margin-top: 95px;
}
.xin {
  width: 40px;
  color: #fff;
  text-align: center;
  height: 40px;
  margin: 0 auto;
  margin-top: 30px;
}
.shenqing {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 120px;
  top: 15px;
  align-items: center;
  color: #fff;
  cursor: pointer;
}
.ziti {
  margin: 0;
  font-size: 14px;
  margin-top: 2px;
}
.tubiao {
  font-size: 25px;
}
.tuijian {
  display: flex;
  flex-direction: column;
  position: absolute;
  right: 15px;
  top: 128px;
  align-items: center;
  color: #fff;
  cursor: pointer;
}
.jianli {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 15px;
  top: 128px;
  align-items: center;
  color: #fff;
  cursor: pointer;
}
.zixun {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 120px;
  bottom: 15px;
  align-items: center;
  color: #fff;
  cursor: pointer;
}
</style>